fix(e2e-next): normalize pod-level status.Resources in pod sync status assertions#4012
Open
sowmyav27 wants to merge 1 commit into
Open
fix(e2e-next): normalize pod-level status.Resources in pod sync status assertions#4012sowmyav27 wants to merge 1 commit into
sowmyav27 wants to merge 1 commit into
Conversation
…s assertions The k8s 1.35 tenant apiserver drops pod-level status.Resources/AllocatedResources (InPlacePodLevelResourcesVerticalScaling is alpha and off by default), so they cannot round-trip from a newer host: the host reports populated values while the tenant reports nil. This made the pod status-sync assertions fail on v0.34 (tenant k8s 1.35) while passing on main/v0.35 (tenant k8s 1.36, gate on). Exclude these two fields from the comparison, like the existing QOSClass handling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What issue type does this pull request address?
/kind test
What does this pull request do? Which issues does it resolve?
The pod status-sync assertions in
e2e-next/test_core/sync/test_pods.go(should start a pod and sync status back to vClusterandshould sync readiness conditions back to the vCluster pod) fail onv0.34while passing onmain/v0.35.Root cause: the virtual apiserver on
v0.34runs k8s 1.35, whereInPlacePodLevelResourcesVerticalScalingis alpha and off by default, so the apiserver drops pod-levelstatus.Resources. The host pod (KIND) reports a non-nil emptyResourceRequirements{}, while the virtual pod reportsnil, soExpect(vpod.Status).To(Equal(pod.Status))fails on that one field.main/v0.35run k8s 1.36 (gate beta/on), where the field is preserved, so they pass.Fix: normalize
status.Resourcesbefore the equality check at both assertion sites, mirroring the existingQOSClasshandling.Please provide a short message that should be published in the vcluster release notes
NONE (e2e test-only fix, no user-facing change)
What else do we need to know?
v0.34-only.
main/v0.35already pass because they run k8s 1.36.E2E Tests
Additional test suites